import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from '@/views/layout'
import Login from '@/views/login'
import Home from '@/views/home'
import Om from '@/views/Workorder/O&M'
import Operation from '@/views/Workorder/operation'
import GetLevel from '@/views/getLevel/getLevel'
import Regional from '@/views/getLevel/regIonal'
import Interlocal from '@/views/getLevel/interIocal'
import VmIndexPage from '@/views/vm/IndexPage'
import TypePage from '@/views/vm/TypePage'
import StatusPage from '@/views/vm/StatusPage'
import OrderIndexPage from '@/views/order/IndexPage'
import ReportIndexPage from '@/views/report/IndexPage'
import Type from '@/views/commodity/Type'
import Manage from '@/views/commodity/manage'

Vue.use(VueRouter)

const routes = [
  { path: '/login', component: Login },
  {
    // 头侧
    path: '/',
    component: Layout,
    children: [
      {
        // 主页
        path: '/home',
        component: Home
      },
      {
        // 运营管理
        path: '/operandmain',
        component: Om
      },
      {
        // 运维
        path: '/operation',
        component: Operation
      },
      {
        // 点位管理
        path: '/getLevel',
        component: GetLevel
      },
      {
        // 区域管理
        path: '/regIonal',
        component: Regional
      },
      {
        // 合作商管理
        path: '/interlocal',
        component: Interlocal
      },
      {
        // 商品管理
        path: '/manage',
        component: Manage
      },
      {
        // 商品管理（类型）
        path: '/type',
        component: Type
      },
      { path: '/vm/index', component: VmIndexPage },
      { path: '/vm/status', component: StatusPage },
      { path: '/vm/type', component: TypePage },
      { path: '/order/index', component: OrderIndexPage },
      { path: '/report/index', component: ReportIndexPage }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
